﻿<UserControl x:Class="StreamToMe.Flow.Windows.WebNode"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	x:Name="UserControl"
	>
    <UserControl.Resources>
        <Storyboard x:Key="OnMouseLeave1">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="border" Storyboard.TargetProperty="(FrameworkElement.LayoutTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="border" Storyboard.TargetProperty="(FrameworkElement.LayoutTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="OnMouseEnter1">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="border" Storyboard.TargetProperty="(FrameworkElement.LayoutTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="border" Storyboard.TargetProperty="(FrameworkElement.LayoutTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
    </UserControl.Resources>
    <UserControl.Triggers>
        <EventTrigger RoutedEvent="Mouse.MouseLeave">
            <BeginStoryboard HandoffBehavior="Compose" Storyboard="{StaticResource OnMouseLeave1}"/>
        </EventTrigger>
        <EventTrigger RoutedEvent="Mouse.MouseEnter">
            <BeginStoryboard HandoffBehavior="Compose" Storyboard="{StaticResource OnMouseEnter1}"/>
        </EventTrigger>
    </UserControl.Triggers>
    <StackPanel x:Name="RenderRoot">
        <WebBrowser Margin="10" x:Name="_Browser" LoadCompleted="_Browser_Loaded" Navigating="_Browser_Navigating" Visibility="Collapsed" Height="700"  Width="1024"/>
        <Border Background="#FFFFFFFF" BorderBrush="#FF000000" BorderThickness="1,1,1,1" CornerRadius="8,8,8,8" x:Name="border" HorizontalAlignment="Center" VerticalAlignment="Center">
            <Border.LayoutTransform>
                <TransformGroup>
                    <ScaleTransform ScaleX="0" ScaleY="0"/>
                    <SkewTransform AngleX="0" AngleY="0"/>
                    <RotateTransform Angle="0"/>
                    <TranslateTransform X="0" Y="0"/>
                </TransformGroup>
            </Border.LayoutTransform>
            <Border.BitmapEffect>
                <DropShadowBitmapEffect/>
            </Border.BitmapEffect>
                <DockPanel Height="Auto">
                    <Button Click="Button_Click">
                        <Image x:Name="_Thumbnail" DockPanel.Dock="Top" Visibility="Visible"  Height="700" Width="1024">
                            <Image.LayoutTransform>
                                <ScaleTransform ScaleX=".25" ScaleY=".25"/>
                            </Image.LayoutTransform>
                        </Image>
                    </Button>
                    <Button DockPanel.Dock="Right" Click="Button_Click_1">Hide</Button>
                </DockPanel>
        </Border>
        <StackPanel x:Name="iconAndLabel">
            <TextBlock MaxWidth="100" Text="{Binding Path=Label, ElementName=UserControl, Mode=OneWay}" TextAlignment="Center" TextWrapping="Wrap"/>
            <Canvas Width="16" Height="16">
                <Ellipse Width="16" Height="16">
                    <Ellipse.Fill>
                        <RadialGradientBrush GradientOrigin="0.25,0.25">
                            <GradientStop Color="#FFF2FFF2" Offset="0"/>
                            <GradientStop Color="#FF005400" Offset="1"/>
                        </RadialGradientBrush>
                    </Ellipse.Fill>
                </Ellipse>
                <Ellipse Width="16" Height="16" x:Name="frontEllipse">
                    <Ellipse.Fill>
                        <RadialGradientBrush GradientOrigin="0.75,0.75">
                            <GradientStop Color="#FF00FF00" Offset="0"/>
                            <GradientStop Color="#0000FF00" Offset="1"/>
                        </RadialGradientBrush>
                    </Ellipse.Fill>
                </Ellipse>
            </Canvas>
        </StackPanel>
    </StackPanel>
</UserControl>
